package com.eliza.library.dao

import androidx.lifecycle.LiveData
import androidx.room.*
import com.eliza.library.model.Contactor
import com.eliza.library.model.QQUser


/*-*- coding:utf-8 -*-
 * @Author  : debi
 * @Time    : 5/1/22
 * @Software: Android Condio
 */

@Dao
interface QQUserDao {
    @Insert
    suspend fun insertQQUser(vararg stu: QQUser)

    @Delete
    suspend fun deleteQQUser(vararg stu: QQUser)

    @Update
    suspend fun updateQQUser(vararg stu: QQUser)

    @Query("SELECT * FROM QQUser")
    fun getAllQQUserList(): LiveData<List<QQUser>>//使用liveData 更新数据

    @Query("SELECT * FROM QQUser Where Id = :id ")
    suspend fun getQQUserById(id: Int): List<QQUser>

}